/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#ifndef PLCPPSUPPORT_H
#define PLCPPSUPPORT_H

#include <stddef.h>
using namespace std;

/**
 * Call all static constructors at the startup.
 */
void initialiseConstructors();

namespace __cxxabiv1 {

/**
 * The ABI requires a 64-bit type.
 */
__extension__ typedef int __guard __attribute__((mode (__DI__)));

/**
 * Is used for thread save static construction. Not used at the moment because
 * we are the kernel thread.
 *
 * @param g The guard object.
 */
extern "C" int __cxa_guard_acquire(__guard *g);

/**
 * Is used for thread save static construction. Not used at the moment because
 * we are the kernel thread.
 *
 * @param g The guard object.
 */
extern "C" void __cxa_guard_release(__guard *g);

/**
 * Abort
 *
 * @param g The guard object.
 */
extern "C" void __cxa_guard_abort (__guard *g);

}

extern "C" void __cxa_call_unexpected(void *);

/**
 * Calling a pure virtual function.
 */
extern "C" void __cxa_pure_virtual(void);

#endif // PLCPPSUPPORT_H
